home *** CD-ROM | disk | FTP | other *** search
/ Solaris Press Kit / Solaris Press Kit.iso / pc / media / solaris.dxr / Internal_62_SaveSpec.ls < prev    next >
Encoding:
Text File  |  2002-10-23  |  1.7 KB  |  57 lines

  1. property pFileName
  2. global gbPC, gRootPath
  3.  
  4. on mouseUp me
  5.   setCursorWait()
  6.   updateStage()
  7.   fxObj = xtra("FileXtra3").new()
  8.   if gbPC then
  9.     dtPath = fxObj.fx_FolderGetSpecialPath("CSIDL_DESKTOPDIRECTORY")
  10.   else
  11.     dtPath = fxObj.fx_FolderGetSpecialPath("kDesktopFolderType")
  12.   end if
  13.   if dtPath = EMPTY then
  14.     alert("Error finding desktop folder" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
  15.     fxObj = 0
  16.     exit
  17.   end if
  18.   DestFolder = dtPath & "Ballistic"
  19.   if not fxObj.fx_FolderExists("destFolder") then
  20.     res = fxObj.fx_FolderCreate(DestFolder)
  21.     if res = 0 then
  22.       alert("Error creating folder on desktop" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
  23.       fxObj = 0
  24.       exit
  25.     end if
  26.   end if
  27.   picFilename = pFileName
  28.   destPath = DestFolder & picFilename
  29.   if gbPC then
  30.     SrcPath = gRootPath & "Special\" & picFilename
  31.     destPath = DestFolder & "\" & picFilename
  32.   else
  33.     SrcPath = gRootPath & "Special:" & picFilename
  34.     destPath = DestFolder & ":" & picFilename
  35.   end if
  36.   res = fxObj.fx_FileCopy(SrcPath, destPath)
  37.   if res = 0 then
  38.     alert("Error copying file" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
  39.     fxObj = 0
  40.     exit
  41.   end if
  42.   fxObj = 0
  43.   setCursorStop()
  44.   updateStage()
  45.   alertObj = new(xtra("MUI"))
  46.   alertInitList = [#Buttons: #Ok, #default: 1, #title: "Download", #Message: "Document Saved", #movable: 1]
  47.   if objectp(alertObj) then
  48.     result = alert(alertObj, alertInitList)
  49.   end if
  50. end
  51.  
  52. on getPropertyDescriptionList
  53.   description = [:]
  54.   addProp(description, #pFileName, [#default: "Notes.doc", #comment: "File Name", #format: #string])
  55.   return description
  56. end
  57.